let { mfutil, addUserStat } = getApp()
Component({
  mixins: [],
  data: {
    active: 0
  },
  props: {
    title: ['', '']
  },
  didMount() {
  },
  didUpdate() {
  },
  didUnmount() { },
  methods: {
    //选项卡切换
    navSelect(event) {
      console.log(event);

      let { index } = event.currentTarget.dataset;
      this.setData({
        active: index
      })
      this.props.onSelectcard(index);
      if (index == 0) {
        console.log(this.props.title[0]);
     

        this.props.onUnfinished('select')
      } else if (index == 1) {
        // // 自定义埋点
        // let customAccessoptions = {
        //   customType: this.props.title[1]
        // }
        // let tracks = addUserStat(customAccessoptions)
        // console.log(this.props.title[1], 'tab切换');
        this.props.onFinished('select')
      }
      this.setData({
        active: index
      })
    }
  },
});
